package com.xique.park.service.service.impl;

import java.util.List;
import com.xique.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.xique.park.mapper.ParkPlatePostponeMapper;
import com.xique.park.bean.domain.ParkPlatePostpone;
import com.xique.park.service.service.IParkPlatePostponeService;

/**
 * 车辆续费Service业务层处理
 * 
 * @author xique
 * @date 2021-12-09
 */
@Service
public class ParkPlatePostponeServiceImpl implements IParkPlatePostponeService 
{
    @Autowired
    private ParkPlatePostponeMapper parkPlatePostponeMapper;

    /**
     * 查询车辆续费
     * 
     * @param id 车辆续费ID
     * @return 车辆续费
     */
    @Override
    public ParkPlatePostpone selectParkPlatePostponeById(Long id)
    {
        return parkPlatePostponeMapper.selectParkPlatePostponeById(id);
    }

    /**
     * 查询车辆续费列表
     * 
     * @param parkPlatePostpone 车辆续费
     * @return 车辆续费
     */
    @Override
    public List<ParkPlatePostpone> selectParkPlatePostponeList(ParkPlatePostpone parkPlatePostpone)
    {
        return parkPlatePostponeMapper.selectParkPlatePostponeList(parkPlatePostpone);
    }

    /**
     * 新增车辆续费
     * 
     * @param parkPlatePostpone 车辆续费
     * @return 结果
     */
    @Override
    public int insertParkPlatePostpone(ParkPlatePostpone parkPlatePostpone)
    {
        parkPlatePostpone.setCreateTime(DateUtils.getNowDate());
        return parkPlatePostponeMapper.insertParkPlatePostpone(parkPlatePostpone);
    }

    /**
     * 修改车辆续费
     * 
     * @param parkPlatePostpone 车辆续费
     * @return 结果
     */
    @Override
    public int updateParkPlatePostpone(ParkPlatePostpone parkPlatePostpone)
    {
        parkPlatePostpone.setUpdateTime(DateUtils.getNowDate());
        return parkPlatePostponeMapper.updateParkPlatePostpone(parkPlatePostpone);
    }

    /**
     * 批量删除车辆续费
     * 
     * @param ids 需要删除的车辆续费ID
     * @return 结果
     */
    @Override
    public int deleteParkPlatePostponeByIds(Long[] ids)
    {
        return parkPlatePostponeMapper.deleteParkPlatePostponeByIds(ids);
    }

    /**
     * 删除车辆续费信息
     * 
     * @param id 车辆续费ID
     * @return 结果
     */
    @Override
    public int deleteParkPlatePostponeById(Long id)
    {
        return parkPlatePostponeMapper.deleteParkPlatePostponeById(id);
    }
}
